package com.xuecheng.manage_course.controller;

import com.xuecheng.api.category.CategoryControllerApi;
import com.xuecheng.framework.domain.course.ext.CategoryNode;
import com.xuecheng.manage_course.service.CategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zhaoxiang
 * @version 1.0
 * @Date 2019/10/30 23:38
 */
@RestController
@RequestMapping("/category")
public class CategoryController implements CategoryControllerApi {

    @Autowired
    private CategoryService categoryService;

    /**
     * 查询课程分类级联列表
     * @return
     */
    @Override
    @GetMapping("/list")
    public CategoryNode list() {
        return categoryService.selectList();
    }
}
